<template>
    <van-search v-model="value" show-action label="北京" placeholder="请输入搜索关键词" @search="onSearch">
        <template #action>
            <div @click="onClickButton">搜索</div>
        </template>
    </van-search>
</template>

<script setup>
// 点击跳转到搜索
// 调用 onSearch
import { useRouter } from 'vue-router';
const router = useRouter()
const onSearch = () => {
    // 跳转到搜索页
    router.push('/search')
}
</script>

<style lang="scss" scoped></style>